<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//ZH-CN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="imagetoolbar" content="no" />
	<title>Class UI.ToolBar</title>
	<link href="../resources/API_Help.css" type="text/css" rel="stylesheet" />
</head>

<body>
<!--打印本页-->
<div class="printCurrentPage">
	<img src="../resources/image/print.gif" align="absmiddle" />&nbsp;
	<a href="ui_ToolBar_API.html" target="_blank">打印本页</a>
</div><br/>

<!--标题说明-->
<h1>Class UI.ToolBar</h1>
<b>定义于文件：</b>&nbsp;&nbsp;webui.js
<div class="description">将页面对象渲染成工具栏控件。</div><br/>
<b>基本语法</b>
<div class="syntax">var toolBar = new <b>UI.ToolBar</b>( &lt; <em>id:String|Tag</em> &gt; );</div>
<b>参数说明</b>
<div class="parameter">
	<ul>
		<li><em>id</em> : String|Tag</li>
		<div class="subDesc">页面工具栏控件标签ID或是页面工具栏控件标签对象。</div>
	</ul>
</div>
<b>页面标签对象原型</b>
<div class="parameter">
	&lt;div&gt;&lt;/div&gt;
</div>
<b>依赖关系</b>
<div class="parameter">
	<a href="core_API.html">core.js</a>　　<a href="#">webui.js</a>
</div><br/>
<a href="#properties">相关属性</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="#methods">相关方法</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="#events">相关事件</a>&nbsp;&nbsp;-&nbsp;&nbsp;
<a href="#examples">应用示例</a>
<hr>

<!--相关属性-->
<a name="properties"></a>
<h2>相关属性</h2>
<table width="100%" cellspacing="0">
	<tbody>
		<tr>
			<td class="tableHead" width="83%">所有属性</td>
			<td class="tableHead" width="17%">所属类</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#UI.ToolBar.dom" class="methodLink">UI.ToolBar.dom</a>&nbsp;:&nbsp;&lt;div&gt;<br/>
				工具栏控件的页面标签对象。
			</td><td class="tableLineRight">UI.ToolBar</td>
		</tr>
	</tbody>
</table>

<!--相关方法-->
<a name="methods"></a>
<h2>相关方法</h2>
<table width="100%" cellspacing="0">
	<tbody>
		<tr>
			<td class="tableHead" width="83%">所有方法</td>
			<td class="tableHead" width="17%">所属类</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#addItem" class="methodLink">addItem</a>( <em>para:JSON</em> )&nbsp;:&nbsp;none<br/>
				为工具栏添加item成员。
			</td><td class="tableLineRight">UI.ToolBar</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#addTextItem" class="methodLink">addTextItem</a>( <em>text:String</em>,&nbsp;&nbsp;<em>split:boolean</em> )&nbsp;:&nbsp;none<br/>
				为工具栏添加文本成员。
			</td><td class="tableLineRight alt">UI.ToolBar</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#addObj" class="methodLink">addObj</a>( <em>obj:Tag</em>,&nbsp;&nbsp;<em>split:boolean</em> )&nbsp;:&nbsp;none<br/>
				为工具栏控件添加自定义组件。
			</td><td class="tableLineRight">UI.ToolBar</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#push" class="methodLink">push</a>( <em>itemIdx:Number</em> )&nbsp;:&nbsp;none<br/>
				设置itemIdx所指的功能按钮的按下状态。
			</td><td class="tableLineRight alt">UI.ToolBar</td>
		</tr>
		<tr>
			<td class="tableLineLeft">
				<a href="#getItemStatus" class="methodLink">getItemStatus</a>( <em>itemIdx:Number</em> )&nbsp;:&nbsp;boolean<br/>
				返回itemIdx所指的功能按钮的按下状态。
			</td><td class="tableLineRight">UI.ToolBar</td>
		</tr>
		<tr>
			<td class="tableLineLeft alt">
				<a href="#setStatusBar" class="methodLink">setStatusBar</a>( <em>statusBar:StatusBar</em> )&nbsp;:&nbsp;none<br/>
				设置信息提示栏对象。
			</td><td class="tableLineRight alt">UI.ToolBar</td>
		</tr>
	</tbody>
</table>

<!--相关事件-->
<a name="events"></a>
<h2>相关事件</h2>
<div class="properties">本类无相关事件。</div><br/>

<hr>

<!--相关属性的详细说明-->
<h2>本类属性的详细说明</h2>
<div class="detailWrap">

<a name="UI.ToolBar.dom"></a>
<div class="mdetail">
	<h3>UI.ToolBar.dom</h3><br/>
	<div class="mdetailDetails">
		工具栏控件的页面标签对象。<br/>
		通过 dom 属性可直接对工具栏控件进行相关操作。
	</div>
	<div class="footer since">@since JSR2.0&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

</div><br/>

<!--相关方法的详细说明-->
<h2>本类方法的详细说明</h2>
<div class="detailWrap">

<a name="addItem"></a>
<div class="mdetail">
	<h3>addItem</h3>
	<div class="functionDefine">public function addItem( para:JSON )</div>
	<div class="mdetailDetails">为工具栏添加item成员。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>para</em> : JSON</li>
			<div class="subDesc">
				创建工具栏成员按钮的参数。<br/>
				参数语法: { <em>text:String</em>,&nbsp;&nbsp;<em>width:Number</em>,&nbsp;&nbsp;<em>icon:String</em>,&nbsp;&nbsp;<em>push:boolean</em>,&nbsp;&nbsp;<em>split:boolean</em>,&nbsp;&nbsp;<em>title:String</em>,&nbsp;&nbsp;<em>action:Function</em> }
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>text</em> : String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按钮的文本名称。</div>
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>width</em> : Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按钮的宽度, 默认值: 70px。</div>
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>icon</em> : String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按钮图标的url。</div>
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>push</em> : boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按钮是否是可按下的模式, 默认值: false。</div>
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>split</em> : boolean|Tag&nbsp;&nbsp;按钮右侧是否带分隔线。</div>
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>title</em> : String&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按钮的气泡提示文本。</div>
				<div class="subDesc">&nbsp;&nbsp;&nbsp;&nbsp;<em>action</em> : Function&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;按钮的单击事件回调。</div>
			</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.5&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

<a name="addTextItem"></a>
<div class="mdetail alt">
	<h3>addTextItem</h3>
	<div class="functionDefine">public function addTextItem( text:String, split:boolean )</div>
	<div class="mdetailDetails">为工具栏添加文本成员。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>text</em> : String</li>
			<div class="subDesc">文本字符串 。</div>
			<li><em>split</em> : boolean</li>
			<div class="subDesc">成员右侧是否带分隔线 。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.5&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

<a name="addObj"></a>
<div class="mdetail">
	<h3>addObj</h3>
	<div class="functionDefine">public function addObj( obj:Tag, split:boolean )</div>
	<div class="mdetailDetails">为工具栏添加自定义成员。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>obj</em> : Tag</li>
			<div class="subDesc">自定义成员的DOM容器。</div>
			<li><em>split</em> : boolean</li>
			<div class="subDesc">成员右侧是否带分隔线 。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.5&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

<a name="push"></a>
<div class="mdetail alt">
	<h3>push</h3>
	<div class="functionDefine">public function push( itemIdx:Number )</div>
	<div class="mdetailDetails">设置itemIdx所指的功能按钮的按下状态。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>itemIdx</em> : Number</li>
			<div class="subDesc">被操作成员的索引号。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.5&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

<a name="getItemStatus"></a>
<div class="mdetail">
	<h3>getItemStatus</h3>
	<div class="functionDefine">public function getItemStatus( itemIdx:Number )</div>
	<div class="mdetailDetails">
		返回itemIdx所指的功能按钮的按下状态。<br/>
		注意：这个集合并不包括没有push属性的成员。
	</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>itemIdx</em> : Number</li>
			<div class="subDesc">被操作成员的索引号。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.5&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

<a name="setStatusBar"></a>
<div class="mdetail alt">
	<h3>setStatusBar</h3>
	<div class="functionDefine">public function setStatusBar( statusBar:StatusBar )</div>
	<div class="mdetailDetails">设置显示成员提示信息的状态栏。</div><br/>
	<div class="mdetailDetails"><b>参数</b>
		<ul>
			<li><em>statusBar</em> : StatusBar</li>
			<div class="subDesc">statusBar 为Jsr中的状态栏控件。</div>
		</ul>
		<b>返回值</b>
		<ul><li>无</li></ul>
	</div>
	<div class="footer since">@since JSR2.5&nbsp;&nbsp;&nbsp;&nbsp;<a href="ui_ToolBar_API.html">Return</a></div><br/>
</div>

</div><br/>

<!--应用示例-->
<a name="examples"></a>
<h2>应用示例</h2>
<div class="properties"><a href="../Example/ui_ToolBar.html" target="_blank">ui_ToolBar.html</a></div><br/>

<!--页脚-->
<hr>
<div class="footer">JSR - Copyright &copy; 2007-2008 Jsr JS, LLC<br/>All rights reserved.</div>
</body>
</html>
